package com.lsb.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 *
 * </p>
 *
 * @author liusibo
 * @since 2021-06-10
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("t_submit")
public class Submit implements Serializable {

    private static final long serialVersionUID = 1L;
    //打卡记录id
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    //用户id
    private Integer userId;
    //用户学号/工号
    private String username;
    //用户真实姓名
    private String realName;
    //用户手机号码
    private String telephoneNumber;
    //用户身份证号
    private String identityNumber;
    //当日体温
    private Double temperature;
    //记录创建时间
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    //记录修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    //记录是否已经提交，用于防止用户二次提交和查看当日未提交的用户
    private Integer isSubmit;

    public Submit(Integer userId, String username, String realName, String telephoneNumber, String identityNumber) {
        this.userId = userId;
        this.username = username;
        this.realName = realName;
        this.telephoneNumber = telephoneNumber;
        this.identityNumber = identityNumber;
    }

    public Submit(Integer userId, String username, String realName, String telephoneNumber, String identityNumber, Date createTime, Date updateTime) {
        this.userId = userId;
        this.username = username;
        this.realName = realName;
        this.telephoneNumber = telephoneNumber;
        this.identityNumber = identityNumber;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }
}
